/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package respaldomysql;

import java.io.*;
import java.io.OutputStreamWriter;
import java.io.FileOutputStream;
import java.io.BufferedWriter;
import javax.swing.JTextArea;
public class Log {
		
	public static void registrar(JTextArea txt,String info){
		txt.append(info);
		File file;
		file = new File("log.txt");
		try{	
			BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), "UTF8"));			
			out.write(info);
			out.close();			
		}catch(IOException e){
			javax.swing.JOptionPane.showMessageDialog(null,e.getMessage());
			System.out.println(e);}	
	}
}
